home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / shell.498 < prev    next >
Text File  |  1992-02-06  |  2KB  |  46 lines

  1. {\rtf0\ansi{\fonttbl\f3\fswiss Helvetica;\f1\fmodern Courier;\f2\fmodern Ohlfs;}
  2. \paperw11440
  3. \paperh9000
  4. \margl120
  5. \margr120
  6. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f3\b0\i0\ul0\fs24 open openfile application icon shell script\
  7. \
  8. Q:  Is it possible to start up a NextStep program from the command line (e.g. from Shell or Terminal) AND still have it show the nice icon associated with that application, instead of the generic "executable" icon?\
  9. \
  10. A:  The 
  11. \b open
  12. \b0  command “opens a file (or a directory), just as if you had double-clicked the icon” (from the 
  13. \b open 
  14. \b0 man page).  The open command also starts a NextStep application as if someone had clicked on it in the Directory Browser.  For example, in the Shell, type\
  15. \
  16.     
  17. \f1 open /NextDeveloper/Demos/SoundPlayer
  18. \f3 \
  19.     \
  20. SoundPlayer will start running and its appIcon window will have the SoundPlayer icon instead of the generic one.\
  21. \
  22. Q:  How can I open a shell script easily in Edit?  It has the executable icon in the Browser, so double-clicking its icon or using 
  23. \b open
  24. \b0  won't do the right thing.  Since I'm already 
  25. \b cd
  26. \b0 'ed to the appropriate directory in Shell, I don't want to bother using Edit's Open panel.\
  27. \
  28. A:  If  Edit is running, the 
  29. \b openfile 
  30. \b0 command will allow you to open a file in Edit even if it's executable, without launching a new copy of Edit.  See the man page.  \
  31. \
  32. If Edit is not already running, you can simply launch it instead of using 
  33. \b openfile
  34. \b0 :\
  35.  
  36. \f1     Edit filename &
  37. \f3 \
  38. This too will work whether or not the file is executable.\
  39. \
  40. QA498            \
  41. \
  42. Valid for 1.0 \
  43. Valid for 2.0\
  44. \
  45.  
  46.